<script type="text/javascript">
    var counter = 1;
    function add_product(valor){
        
        var result = $.parseJSON(valor);
        
        parent.window.$product_dialog.dialog("close");
        
        //cargando las datos del producto en la lista
        
        var amount_count = $(parent.document.getElementById('amount')).get(0).value;
        $(parent.document.getElementById("amount")).get(0).value = "";
        
        $.post('../product/Ajaxcall', {id_product:result.id_product,count:counter,amount:amount_count,price:result.price}, function(data){
            var table_dinamic = $(parent.document.getElementById('grid-dinamic')).get(0);
            table_dinamic.innerHTML = table_dinamic.innerHTML + data;
            counter++;
            
        });
    }
    
    
    
</script>
<table width="100%">
    <tr>
        <td><?php echo $grid_product_remote->show() ?></td>
    </tr>
</table>
